import 'package:get/get.dart';
import 'package:honeypotflutter/modules/cabinet/pages/cabinet/view.dart';
import 'package:honeypotflutter/modules/deliver/pages/deliver_scanf/view.dart';
import 'package:honeypotflutter/modules/gather/page/gather/view.dart';
import 'package:honeypotflutter/modules/hire/pages/hire/view.dart';
import 'package:honeypotflutter/modules/hire/pages/hire_empty/view.dart';
import 'package:honeypotflutter/modules/package/page/package/view.dart';
import 'package:honeypotflutter/modules/package/page/package_retention/view.dart';
import 'package:honeypotflutter/modules/tickets/page/tickets_list/view.dart';
import 'package:honeypotflutter/router/bussine_autonym_middleware.dart';
import 'package:honeypotflutter/router/bussine_bind.dart';
import 'package:honeypotflutter/modules/account/page/account_balance/view.dart';
import 'package:honeypotflutter/modules/autonym/pag/autonym_status/view.dart';
import 'package:honeypotflutter/modules/billing/page/billing/view.dart';
import 'package:honeypotflutter/modules/freePay/page/free_pay_close/view.dart';
import 'package:honeypotflutter/modules/freePay/page/free_pay_exchange/view.dart';
import 'package:honeypotflutter/modules/freePay/page/free_pay_open/view.dart';
import 'package:honeypotflutter/modules/login/pages/login/view.dart';
import 'package:honeypotflutter/modules/login/pages/login_forget/view.dart';
import 'package:honeypotflutter/modules/recharge/page/recharge/view.dart';
import 'package:honeypotflutter/modules/setting/page/setting/view.dart';
import 'package:honeypotflutter/modules/signFor/page/signFor.dart';
import 'package:honeypotflutter/modules/tabBar/view.dart';
import 'package:honeypotflutter/router/bussine_login_middleware.dart';
import 'package:honeypotflutter/router/bussine_router_url.dart';
import '../modules/preferences/page/preferences_list.dart';

class MGRouter {
  static List<GetPage> routs = [
    /// tabBar
    GetPage(
        name: MGRouterUrl.index,
        middlewares: [MGLoginMiddleware()],
        binding: MGBussineBind(),
        page: () {
          return const TabBarPage();
        }),

    /// 登录
    GetPage(
        name: MGRouterUrl.login,
        page: () {
          return const LoginPage();
        }),

    /// 忘记密码
    GetPage(
        name: MGRouterUrl.login_forget,
        page: () {
          return const LoginForgetPage();
        }),

    /// 签收设置
    GetPage(
        name: MGRouterUrl.sign_for,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const SignForPage();
        }),

    /// 偏好设置
    GetPage(
        name: MGRouterUrl.preferences_list,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const PreferencesListPage();
        }),

    /// 设置
    GetPage(
        name: MGRouterUrl.setting,
        page: () {
          return const SettingPage();
        }),

    /// 免密支付关
    GetPage(
        name: MGRouterUrl.freePay_close,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const FreePayClosePage();
        }),

    /// 免密支付开
    GetPage(
        name: MGRouterUrl.freePay_open,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const FreePayOpenPage();
        }),

    /// 免密支付切换
    GetPage(
        name: MGRouterUrl.freePay_exchange,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const FreePayExchangePage();
        }),

    /// 账户
    GetPage(
        name: MGRouterUrl.account_balance,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const AccountBalancePage();
        }),

    /// 账单详情
    GetPage(
        name: MGRouterUrl.billing,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const BillingPage();
        }),

    /// 充值
    GetPage(
        name: MGRouterUrl.recharge,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return const RechargePage();
        }),

    /// 认证
    GetPage(
        name: MGRouterUrl.autonym,
        page: () {
          return AutonymStatusPage();
        }),

    /// 租用格口
    GetPage(
        name: MGRouterUrl.hire,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return HirePage();
        }),

    /// 空箱查询
    GetPage(
        name: MGRouterUrl.emptyHire,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return HireEmptyPage();
        }),

    /// 包裹查询
    GetPage(
        name: MGRouterUrl.package,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return PackagePage();
        }),

    /// 包裹查询 - 滞留件
    GetPage(
        name: MGRouterUrl.package_retention,
        page: () {
          return PackageRetentionPage();
        }),

    /// 投递 - 扫一扫
    GetPage(
        name: MGRouterUrl.deliver_scanf,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return DeliverScanfPage();
        }),

    /// 工单记录
    GetPage(
        name: MGRouterUrl.tickets_list,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return TicketsListPage();
        }),

    /// 工单记录
    GetPage(
        name: MGRouterUrl.cabinet,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return CabinetPage();
        }),

    /// 揽件
    GetPage(
        name: MGRouterUrl.gather,
        middlewares: [MGAutonymMiddleware()],
        page: () {
          return GatherPage();
        }),
  ];
}
